package com.tanhua.dubbo.api.mongo;

import com.tanhua.model.mongo.VideoLike;
import com.tanhua.model.vo.PageResult;
import org.bson.types.ObjectId;

import java.util.List;
import java.util.Map;

public interface VideoLikeApi {

    /**
     * 视频点赞
     * @param videoLike
     */
    Integer like(VideoLike videoLike);

    /**
     * 视频取消点赞
     * @param videoLike
     */
    Integer dislike(VideoLike videoLike);

    /**
     * 获得评论列表
     * @param videoLike
     * @param page
     * @param pageSize
     * @return
     */
    PageResult<VideoLike> getComments(VideoLike videoLike, Long page, Long pageSize);

    /**
     * 发布评论
     * @param videoLike
     */
    void publishComments(VideoLike videoLike);

    /**
     * 用户是否喜欢动态
     * @param userId
     * @param videoIds
     * @return
     */
    Map<ObjectId, Boolean> getHasLikes(Long userId, List<ObjectId> videoIds);
}
